import Vue from 'vue'
import VueRouter from 'vue-router'
import Xuanze from '../views/xuanze.vue'

Vue.use(VueRouter)

const routes = [{
        path: '/',
        name: 'xuanze',
        component: Xuanze
    },
    {
        path: '/login',
        name: 'login',
        component: () =>
            import ( /* webpackChunkName: "login" */ '../views/login.vue')
    },
    {
        path: '/index',
        name: 'index',
        component: () =>
            import ( /* webpackChunkName: "index" */ '../views/index.vue'),
        children: [{
                path: '/index/home',
                name: 'home',
                component: () =>
                    import ( /* webpackChunkName: "home" */ '../views/Home.vue')
            },
            {
                path: '/index/about',
                name: 'about',
                component: () =>
                    import ( /* webpackChunkName: "about" */ '../views/About.vue')
            },
            {
                path: '/index/kuaisu',
                name: 'kuaisu',
                component: () =>
                    import ( /* webpackChunkName: "kuaisu" */ '../views/kuaisu.vue')
            },
            {
                path: '/index/jilu',
                name: 'jilu',
                component: () =>
                    import ( /* webpackChunkName: "jilu" */ '../views/jilu.vue')
            },
            {
                path: '/index/my',
                name: 'my',
                component: () =>
                    import ( /* webpackChunkName: "my" */ '../views/my.vue')
            }
        ]
    }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router